package cn.source.system.dingding.service.impl;

import cn.source.system.dingding.mapper.DingAuthMapper;
import cn.source.system.dingding.service.DingAuthService;
import cn.source.system.module.entity.DailyViewUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DingAuthServiceImpl implements DingAuthService {
    @Autowired
    private DingAuthMapper dingAuthMapper;

    @Override
    public DailyViewUser getUserByUserId(String userId) {
        return null;
    }

    @Override
    public DailyViewUser getUserByUsername(String mobile) {
        return null;
    }

    @Override
    public List<DailyViewUser> exitUserInfo(String dingUserId) {
        /*if(dingAuthMapper.exitUserInfo(dingUserId)==null){
            return true;
        }else{
            return false;
        }*/
        return dingAuthMapper.exitUserInfo(dingUserId);
    }

    @Override
    public void insertUserInfo(DailyViewUser dailyViewUser) {
        dingAuthMapper.insertUserInfo(dailyViewUser);
    }

    @Override
    public DailyViewUser selectUserInfo(String dingUserId){
        return dingAuthMapper.selectUserInfo(dingUserId);
    }

    @Override
    public void updateUserPosition(String dingUserId,String title){
        dingAuthMapper.updateUserPosition(title,dingUserId);
    }

}
